##rem $Id: CatComp_h.sd,v 1.2 1999/11/28 03:36:41 carlos Exp $
##stringtype C
##shortstrings

#ifndef %b_STRINGS_H
#define %b_STRINGS_H

/****************************************************************

   This file was created automatically by `%fv'
   from "%f0"

   using CatComp.sd 1.2 (24.09.1999)

   Do NOT edit by hand!

****************************************************************/

#ifndef EXEC_TYPES_H
#include <exec/types.h>
#endif

#ifdef  %b_BASIC_CODE
#undef  %b_BASIC
#undef  %b_CODE
#define %b_BASIC
#define %b_CODE
#endif

#ifdef  %b_BASIC
#undef  %b_ARRAY
#undef  %b_BLOCK
#define %b_ARRAY
#define %b_BLOCK
#endif

#ifdef  %b_ARRAY
#undef  %b_NUMBERS
#undef  %b_STRINGS
#define %b_NUMBERS
#define %b_STRINGS
#endif

#ifdef  %b_BLOCK
#undef  %b_STRINGS
#define %b_STRINGS
#endif


#ifdef %b_CODE
#include <proto/locale.h>
extern struct Library *LocaleBase;
#endif

#ifdef %b_NUMBERS

#define %i %d

#endif /* %b_NUMBERS */


/****************************************************************************/


#ifdef %b_STRINGS

#define %i_STR %s

#endif /* %b_STRINGS */


/****************************************************************************/


#ifdef %b_ARRAY

struct %b_ArrayType
{
    LONG   cca_ID;
    STRPTR cca_Str;
};

static const struct %b_ArrayType %b_Array[] =
{
    { %i, (STRPTR)%i_STR },
};


#endif /* %b_ARRAY */


/****************************************************************************/


#ifdef %b_BLOCK

static const char %b_Block[] =
{

     "%4a" "%2t"\n    %i_STR "%z"

};

#endif /* %b_BLOCK */


/****************************************************************************/


#ifdef %b_CODE

#ifndef %b_CODE_EXISTS
 #define %b_CODE_EXISTS

 STRPTR Get%bString(struct %b_LocaleInfo *li, LONG stringNum)
 {
 LONG   *l;
 UWORD  *w;
 STRPTR  builtIn;

     l = (LONG *)%b_Block;

     while (*l != stringNum)
       {
       w = (UWORD *)((ULONG)l + 4);
       l = (LONG *)((ULONG)l + (ULONG)*w + 6);
       }
     builtIn = (STRPTR)((ULONG)l + 6);

// #define %b_XLocaleBase LocaleBase
// #define LocaleBase li->li_LocaleBase
    
     if(LocaleBase && li)
        return(GetCatalogStr(li->li_Catalog, stringNum, builtIn));

// #undef  LocaleBase
// #define LocaleBase XLocaleBase
// #undef  %b_XLocaleBase

     return(builtIn);
 }

#else

 STRPTR Get%bString(struct %b_LocaleInfo *li, LONG stringNum);

#endif /* %b_CODE_EXISTS */

#endif /* %b_CODE */


/****************************************************************************/


#endif /* %b_STRINGS_H */
